package com.ssm.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice(basePackages = "com.ssm.controller")
public class GlobalExceptionResolver {
    @ExceptionHandler(value = SysException.class)
    public ExceptionResult handleException(SysException e){
        ExceptionResult result = ExceptionResult.getInstance(e.getResultCode());
        return result;
    }
}
